 *use Long Behav fMRI_ALL_NEW in data file
 
 
 ***GROUP LEVEL PROBITS on right/left
 
 gen right = .
 replace right = 1 if selection=="right"
 replace right = 0 if selection=="left"
  
 *avstd(rating) = 1.47787262593367 (from MATLAB codes)
  
 gen hrl = (stimuli_right_health - stimuli_left_health)/1.47787262593367
 gen trl = (stimuli_right_taste - stimuli_left_taste)/1.47787262593367
 gen rhealthier = sign(hrl)
 gen rtastier = sign(trl)
  
 gen chall=0
 replace chall = 1 if type==1|type==3
  
   
 *For approach 1 and 2
 
  meprobit right hrl trl rhealthier if chall==0&load=="LL" ||efood: 
 
  meprobit right hrl trl rhealthier if chall==0&load=="HL" ||efood: 
 
 
 *For approach 3 

 meprobit right hrl trl rhealthier rtastier  if load=="LL" ||efood: 
  
  meprobit right hrl trl rhealthier rtastier  if load=="HL" ||efood: 
  
  
   
  
  ***RESULTS FOR BINARY MEASURES (to tables)
  
  gen healthier = selected_by_number - 1
  gen tastier = healthier
  replace tastier = 1-healthier if chall==1
  
  gen condition = 0
  replace condition = 1 if load=="HL"
  
  gen subject = efood
  
  
  *TABLE 3
 
 *unadjusted model
  mixed healthier condition if chall==0 || subject: condition
estat ic

mixed healthier condition if chall==0 || subject: condition, cov(un)
estat ic

mixed healthier condition if chall==0 || subject:  condition, nocon
estat ic

mixed healthier condition if chall==0 || subject:  condition, cov(un) nocon
estat ic

mixed healthier condition if chall==0 || subject:  , nocon
estat ic

mixed healthier condition if chall==0 || subject: , cov(un) nocon
estat ic

mixed healthier condition if chall==0 || subject:  
estat ic

mixed healthier condition if chall==0 || subject:  , cov(un) 
estat ic
  
  *Winner:
  mixed healthier condition if chall==0 || subject: 
  estat ic
  
  
  *adjusted model
    mixed healthier condition td2minus1 hd2minus1 if chall==0 || subject: condition td2minus1 hd2minus
estat ic

mixed healthier condition td2minus1 hd2minus if chall==0 || subject: condition td2minus1 hd2minus, cov(un)
estat ic
*can't calculate this

mixed healthier condition td2minus1 hd2minus if chall==0 || subject:  condition td2minus1 hd2minus, nocon
estat ic

mixed healthier condition td2minus1 hd2minus if chall==0 || subject:  condition td2minus1 hd2minus, cov(un) nocon
estat ic

mixed healthier condition td2minus1 hd2minus if chall==0 || subject:  , nocon
estat ic

mixed healthier condition td2minus1 hd2minus if chall==0 || subject: , cov(un) nocon
estat ic

mixed healthier condition td2minus1 hd2minus if chall==0 || subject:  
estat ic

mixed healthier condition td2minus1 hd2minus if chall==0 || subject:  , cov(un) 
estat ic
  
  *Winner:
  mixed healthier condition td2minus1 hd2minus if chall==0 || subject: 
  estat ic
  
  
  *TABLE 4
  
  *adjusted model
    mixed healthier condition td2minus1 hd2minus1 || subject: condition td2minus1 hd2minus
estat ic

mixed healthier condition td2minus1 hd2minus  || subject: condition td2minus1 hd2minus, cov(un)
estat ic

mixed healthier condition td2minus1 hd2minus || subject:  condition td2minus1 hd2minus, nocon
estat ic

mixed healthier condition td2minus1 hd2minus  || subject:  condition td2minus1 hd2minus, cov(un) nocon
estat ic

mixed healthier condition td2minus1 hd2minus  || subject:  , nocon
estat ic

mixed healthier condition td2minus1 hd2minus || subject: , cov(un) nocon
estat ic

mixed healthier condition td2minus1 hd2minus || subject:  
estat ic

mixed healthier condition td2minus1 hd2minus  || subject:  , cov(un) 
estat ic
  
  *Winner:
  mixed healthier condition td2minus1 hd2minus  || subject: condition td2minus1 hd2minus, cov(un)
  estat ic
  
  
  *unadjusted model
  mixed healthier condition  || subject: condition
estat ic

mixed healthier condition  || subject: condition, cov(un)
estat ic

mixed healthier condition || subject:  condition, nocon
estat ic

mixed healthier condition  || subject:  condition, cov(un) nocon
estat ic

mixed healthier condition  || subject:  , nocon
estat ic

mixed healthier condition  || subject: , cov(un) nocon
estat ic

mixed healthier condition  || subject:  
estat ic

mixed healthier condition  || subject:  , cov(un) 
estat ic

*Winner:
mixed healthier condition  || subject:  , cov(un) 
estat ic


*TABLE S5

*no interact model
  mixed healthier condition chall  || subject: condition chall
estat ic

mixed healthier condition chall || subject: condition chall, cov(un)
estat ic
*can't calculate

mixed healthier condition chall || subject:  condition chall, nocon
estat ic

mixed healthier condition chall || subject:  condition chall, cov(un) nocon
estat ic

mixed healthier condition chall || subject:  , nocon
estat ic

mixed healthier condition chall || subject: , cov(un) nocon
estat ic

mixed healthier condition chall || subject:  
estat ic

mixed healthier condition chall || subject:  , cov(un) 
estat ic

*Winner:
mixed healthier condition chall || subject: condition chall, 
estat ic
  mixed healthier condition##chall || subject: condition##chall, 
  estat ic
  *no interaction
  
  
  *TABLE S6
  
  *adjusted model
    mixed tastier condition td2minus1 hd2minus1 || subject: condition td2minus1 hd2minus
estat ic

mixed tastier condition td2minus1 hd2minus  || subject: condition td2minus1 hd2minus, cov(un)
estat ic

mixed tastier condition td2minus1 hd2minus || subject:  condition td2minus1 hd2minus, nocon
estat ic

mixed tastier condition td2minus1 hd2minus  || subject:  condition td2minus1 hd2minus, cov(un) nocon
estat ic

mixed tastier condition td2minus1 hd2minus  || subject:  , nocon
estat ic

mixed tastier condition td2minus1 hd2minus || subject: , cov(un) nocon
estat ic

mixed tastier condition td2minus1 hd2minus || subject:  
estat ic

mixed tastier condition td2minus1 hd2minus  || subject:  , cov(un) 
estat ic
  
  *Winner:
  mixed tastier condition td2minus1 hd2minus  || subject: condition td2minus1 hd2minus, cov(un)
  estat ic
  
  
  *unadjusted model
  mixed tastier condition  || subject: condition
estat ic

mixed tastier condition  || subject: condition, cov(un)
estat ic

mixed tastier condition || subject:  condition, nocon
estat ic

mixed tastier condition  || subject:  condition, cov(un) nocon
estat ic

mixed tastier condition  || subject:  , nocon
estat ic

mixed tastier condition  || subject: , cov(un) nocon
estat ic

mixed tastier condition  || subject:  
estat ic

mixed tastier condition  || subject:  , cov(un) 
estat ic

*Winner:
mixed tastier condition  || subject: 
estat ic 

 
*TABLE S8
*no interact model
  mixed tastier condition chall  || subject: condition chall
estat ic

mixed tastier condition chall || subject: condition chall, cov(un)
estat ic

mixed tastier condition chall || subject:  condition chall, nocon
estat ic

mixed tastier condition chall || subject:  condition chall, cov(un) nocon
estat ic

mixed tastier condition chall || subject:  , nocon
estat ic

mixed tastier condition chall || subject: , cov(un) nocon
estat ic

mixed tastier condition chall || subject:  
estat ic

mixed tastier condition chall || subject:  , cov(un) 
estat ic

*Winner:
mixed tastier condition chall || subject: condition chall, cov(un)
estat ic
mixed tastier condition##chall || subject: condition##chall, cov(un)
  estat ic
  *no interact

  
  *TABLE S9
  *unadjusted model
  mixed healthier condition if chall==1 || subject: condition
estat ic

mixed healthier condition if chall==1 || subject: condition, cov(un)
estat ic

mixed healthier condition if chall==1 || subject:  condition, nocon
estat ic

mixed healthier condition if chall==1 || subject:  condition, cov(un) nocon
estat ic

mixed healthier condition if chall==1 || subject:  , nocon
estat ic

mixed healthier condition if chall==1 || subject: , cov(un) nocon
estat ic

mixed healthier condition if chall==1 || subject:  
estat ic

mixed healthier condition if chall==1 || subject:  , cov(un) 
estat ic
  
  *Winner:
 mixed healthier condition if chall==1 || subject:  
  estat ic
  
  
  *adjusted model
    mixed healthier condition td2minus1 hd2minus1 if chall==1 || subject: condition td2minus1 hd2minus
estat ic

mixed healthier condition td2minus1 hd2minus if chall==1 || subject: condition td2minus1 hd2minus, cov(un)
estat ic
*can't calculate

mixed healthier condition td2minus1 hd2minus if chall==1 || subject:  condition td2minus1 hd2minus, nocon
estat ic

mixed healthier condition td2minus1 hd2minus if chall==1 || subject:  condition td2minus1 hd2minus, cov(un) nocon
estat ic

mixed healthier condition td2minus1 hd2minus if chall==1 || subject:  , nocon
estat ic

mixed healthier condition td2minus1 hd2minus if chall==1 || subject: , cov(un) nocon
estat ic

mixed healthier condition td2minus1 hd2minus if chall==1 || subject:  
estat ic

mixed healthier condition td2minus1 hd2minus if chall==1 || subject:  , cov(un) 
estat ic
  
  *Winner:
  mixed healthier condition td2minus1 hd2minus if chall==1 || subject: condition td2minus1 hd2minus
  estat ic
  
  
  **TABLE 5
  gen unhfood = howmanytimesaweekdoyoueatcakebis + howmanytimesaweekdoyoueaticecrea + howmanytimesaweekdoyoueatchocola + howmanytimesaweekdoyoueatcrisps + howmanytimesaweekdoyoueatcracke


  
  *unadjusted model
  mixed healthier condition unhfood if chall==1 || subject: condition
estat ic

mixed healthier condition unhfood if chall==1 || subject: condition, cov(un)
estat ic

mixed healthier condition unhfood if chall==1 || subject:  condition, nocon
estat ic

mixed healthier condition unhfood if chall==1 || subject:  condition, cov(un) nocon
estat ic

mixed healthier condition unhfood if chall==1 || subject:  , nocon
estat ic

mixed healthier condition unhfood if chall==1 || subject: , cov(un) nocon
estat ic

mixed healthier condition unhfood if chall==1 || subject:  
estat ic

mixed healthier condition unhfood if chall==1 || subject:  , cov(un) 
estat ic
  
  *Winner:
 mixed healthier condition unhfood if chall==1 || subject:   
  estat ic
   mixed healthier condition##c.unhfood if chall==1 || subject:   
  estat ic
  *no interact
  mixed healthier unhfood if chall==1&condition==0 || subject: 
   mixed healthier unhfood if chall==1&condition==1 || subject: 
  *HL p=0.096, LL p = 0.139
  
  *adjusted model
    mixed healthier condition unhfood td2minus1 hd2minus1 if chall==1 || subject: condition td2minus1 hd2minus
estat ic

mixed healthier condition unhfood td2minus1 hd2minus if chall==1 || subject: condition td2minus1 hd2minus, cov(un)
estat ic

mixed healthier condition unhfood td2minus1 hd2minus if chall==1 || subject:  condition td2minus1 hd2minus, nocon
estat ic

mixed healthier condition unhfood td2minus1 hd2minus if chall==1 || subject:  condition td2minus1 hd2minus, cov(un) nocon
estat ic

mixed healthier condition unhfood td2minus1 hd2minus if chall==1 || subject:  , nocon
estat ic

mixed healthier condition unhfood td2minus1 hd2minus if chall==1 || subject: , cov(un) nocon
estat ic

mixed healthier condition unhfood td2minus1 hd2minus if chall==1 || subject:  
estat ic

mixed healthier condition unhfood td2minus1 hd2minus if chall==1 || subject:  , cov(un) 
estat ic
   
  *Winner:
   mixed healthier condition unhfood td2minus1 hd2minus if chall==1 || subject: condition td2minus1 hd2minus, cov(un)
  estat ic
   mixed healthier condition##c.unhfood td2minus1 hd2minus if chall==1 || subject: condition##c.unhfood  td2minus1 hd2minus, cov(un)
  estat ic
  *can't calculate
  mixed healthier condition##c.unhfood td2minus1 hd2minus if chall==1 || subject: condition##c.unhfood  td2minus1 hd2minus, cov(un)
  estat ic
  mixed healthier condition##c.unhfood td2minus1 hd2minus if chall==1 || subject: condition##c.unhfood  td2minus1 hd2minus, 
  estat ic
   mixed healthier condition##c.unhfood td2minus1 hd2minus if chall==1 || subject:   td2minus1 hd2minus, 
  mixed healthier condition##c.unhfood td2minus1 hd2minus if chall==1 || subject:   
  *no interact in any model
  
  mixed healthier unhfood td2minus1 hd2minus if chall==1&condition==0 || subject: td2minus1 hd2minus, cov(un)
  mixed healthier unhfood td2minus1 hd2minus if chall==1&condition==1 || subject: td2minus1 hd2minus, cov(un)
  *HL p = 0.169, LL p = 0.560
  
  
   